@extends('contest/layouts/default')
@section('title')
Gửi bài dự thi
@stop
@section('content')
<div class="af">
    <div class="wapper" style="padding: 0">
        <div class="default-width-left">
            <div class="menu-prive">
                <ul>
                    <li class="active"></li>
                </ul>
            </div>
            <h3>
                <span class="glyphicon glyphicon-pencil"></span>
                <?= empty($data['video']->id) ? "Đăng bài dự thi" : "Sửa bài dự thi"; ?>
            </h3>

            <form class="form-horizontal" role="form" action="" method="post">
                {{ Form::token() }}
                <input type="hidden" name="data[Video][id]" id="data[Video][id]" value="{{ $data['video']->id }}"/>

                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group <?= $errors->has('title') ? "error" : ""; ?>">
                            <label class="control-label col-sm-3">
                                Tiêu đề
                            </label>

                            <div class="col-sm-9">
                                <input class="form-control" name="data[Video][title]"
                                       value="<?= $data['video']->title ?>"/>
                            </div>
                        </div>
                        <div class="form-group <?= $errors->has('video') ? "error" : ""; ?>">
                            <label class="control-label col-sm-3">
                                Youtube Url
                            </label>

                            <div class="col-sm-9">
                                <input class="form-control" name="data[Video][video]"
                                       value="<?= $data['video']->video ?>"/>
                            </div>
                        </div>
                        <div class="form-group <?= $errors->has('title') ? "error" : ""; ?>">
                            <label class="control-label col-sm-3">
                                Chủ đề
                            </label>

                            <div class="col-sm-9">
                                <input class="form-control" name="data[Tag][tags]" value=""/>
                            </div>
                        </div>
                        <div class="form-group <?= $errors->has('title') ? "error" : ""; ?>">
                            <label class="control-label col-sm-3">
                                Cuộc thi
                            </label>

                            <div class="col-sm-9">

                            </div>
                        </div>
                        <div class="form-group <?= $errors->has('title') ? "error" : ""; ?>">
                            <label class="control-label col-sm-3">
                                Nội dung
                            </label>

                            <div class="col-sm-9">
                                <textarea name="data[Video][content]" class="form-control">
                                    <?= $data['video']->content ?>
                                </textarea>
                            </div>
                        </div>
                        <div class="control-group" align="right">
                            <div class="controls">
                                <a class="btn btn-link" href="{{ route('san-dien') }}">Hủy</a>
                                <button type="submit" class="btn btn-success">Lưu</button>
                            </div>
                        </div>
                    </div>

                </div>
            </form>
        </div>
    </div>
</div>
@stop